//
//  HLLoginOptionRequest.m
//  YueYue
//
//  Created by hulu001 on 2023/5/20.
//

#import "HLLoginOptionRequest.h"

@implementation HLLoginOptionRequest
{
    NSDictionary *_params;
    HLLoginOptionType _type;
}

- (id)initWithType:(HLLoginOptionType)type params:(NSDictionary *)params
{
    self = [super init];
    
    if (self) {
        _type = type;
        _params = params;
    }
    
    return self;
}



- (NSString *)requestUrl
{
    switch (_type) {
        case HLLoginOptionTypeLogin:
            return @"/login";
            break;
        case HLLoginOptionTypeInfo:
            return @"/user/home_page/update";
            break;
        case HLLoginOptionTypeMobile:
            return @"/login/mobile";
            break;
        case HLLoginOptionTypeEmail:
            return @"/login/email";
            break;
        case HLLoginOptionTypeWechat:
            return @"/wechat";
            break;
        case HLLoginOptionTypeApple:
            return @"/login/apple";
            break;
        case HLLoginOptionTypePassword:
            return @"/login/pwd";
            break;
        case HLLoginOptionTypeSendPasswordCode:
            return @"/common/change/sendSmsCode/weadasdawwda";
            break;
        case HLLoginOptionTypeBindOrModifyPassword:
            return @"/login/bindOrModify/pwd";
            break;
        case HLLoginOptionTypeBindOrModifyMobile:
            return @"/bind/bindOrModify/mobile";
            break;
        case HLLoginOptionTypeBindOrModifyEmail:
            return @"/bind/bindOrModify/email";
            break;
        case HLLoginOptionTypeSendMailCode:
            return @"/sendMailCode";
            break;
        case HLLoginOptionTypeSendSmsCode:
            return @"/common/change/sendSmsCode/weadasdawwda";
            break;
        case HLLoginOptionTypeRandNickname:
            return @"/user/random_nickname";
            break;
    }
    
}

- (YTKRequestMethod)requestMethod
{
    return YTKRequestMethodPOST;
}

- (id)requestArgument
{
    if (_params){
        return _params;
    } else {
        return @{};
    }
}

@end
